thread pool(线程池):在并发/多线程编程中,预先创建并维护的一组可复用线程,用来执行提交的任务(task)。通过复用线程减少频繁创建/销毁线程的开销,并便于限制并发数量、提升吞吐与稳定性。(在某些语境下也可泛指“线程资源池”。)
/ˈθrɛd puːl/
A thread pool runs tasks in the background.
线程池在后台运行任务。
Using a bounded thread pool can prevent the server from creating too many threads under heavy load.
使用有界线程池可以防止服务器在高负载下创建过多线程。
thread 原意为“线”,在计算机领域借喻为“执行线程”(一条执行路径);来自古英语 þrǣd(线、丝)。pool 指“共享资源池/集合”,来自中世纪英语 pol(水塘、池),引申为“集中存放并共享使用的资源”。合在一起,thread pool 字面即“线程的池子”,强调“集中管理、重复利用”。